package com.CST.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("ETL_Account")
public class EtlAccount {
    @TableId(value = "ID", type = IdType.AUTO)
    @ExcelIgnore
    private Integer id;

    @TableField(value = "AccountCode")
    @ExcelProperty(value = "会计科目编号",index = 0)
    @ColumnWidth(20)
    @ApiModelProperty(value = "会计科目编号")
    private String accountcode;

    @TableField(value = "AccountName")
    @ExcelProperty(value = "会计科目名称",index = 1)
    @ColumnWidth(20)
    @ApiModelProperty(value = "会计科目名称")
    private String accountname;


//    @ExcelIgnore\
    @ApiModelProperty(value = "层级")
    @ExcelProperty(value = "层级编码",index = 2)
    @ColumnWidth(15)
    @TableField(value = "ParentCode")
    private String parentcode;


    @TableField(exist = false)
    @ExcelProperty(value = "费用要素编码",index = 3)
    @ColumnWidth(20)
    private String deptCode;

    @TableField(exist = false)
    @ExcelProperty(value = "费用要素名称",index = 4)
    @ColumnWidth(20)
    private String deptName;

    @ApiModelProperty(value = "父节点")
    @ExcelIgnore
    private String parentAccountCode;

    @TableField(value = "IsEnd")
    @ExcelIgnore
    @ApiModelProperty(value = "是否为末级 0:不是 1:是")
    private Integer isend;

    @TableField(value = "Seq")
    @ExcelIgnore
    @ApiModelProperty(value = "排序")
    private Integer seq;

    @TableField(value = "SysID")
    @ExcelIgnore
    @ApiModelProperty(value = "系统来源ID对应枚举BD_SysSource")
    private String sysid;

    @TableField(value = "SysName")
    @ExcelIgnore
    @ApiModelProperty(value = "系统来源名称")
    private String sysname;

    @ApiModelProperty(value = "是否有效")
    @ExcelIgnore
    @ExcelProperty(value = "RowStatus")
    @TableField("RowStatus")
    private String rowStatus;


    @ApiModelProperty(value = "创建人")
    @ExcelIgnore
    @ExcelProperty(value = "CreatedBy")
    @TableField("CreatedBy")
    private String createdBy;

    @ApiModelProperty(value = "创建时间",example = "2020-02-05 13:30:41")
    @ExcelIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @ExcelProperty(value = "CreatedOn")
    @TableField("CreatedOn")
    private String createdOn;

    @ApiModelProperty(value = "修改人")
    @ExcelIgnore
    @ExcelProperty(value = "UpdatedBy")
    @TableField("UpdatedBy")
    private String updatedBy;


    @ApiModelProperty(value = "修改时间",example = "2020-02-05 13:30:41")
    @ExcelIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @ExcelProperty(value = "UpdatedOn")
    @TableField("UpdatedOn")
    private String updatedOn;

    @ExcelProperty(value = "Remark")
    @ExcelIgnore
    @TableField("Remark")
    private String remark;

    @TableField("iyear")
    @ExcelIgnore
    private String iyear;

    @TableField(exist = false)
    @ExcelIgnore
    private List<BdAccount> childrenList;

    @TableField(exist = false)
    @ExcelIgnore
    private List<EtlAccount> child;

    @TableField(exist = false)
    @ExcelIgnore
    private String relationStatus;

    @TableField(exist = false)
    @ExcelIgnore
    private Integer edId;

    @TableField(exist = false)
    @ExcelIgnore
    private String edParentCode;

    @TableField(exist = false)
    @ExcelIgnore
    private Integer month;

    @TableField(exist = false)
    @ExcelIgnore
    private Integer year;

    @TableField(exist = false)
    @ExcelIgnore
    private String num;

    @TableField(exist = false)
    @ExcelIgnore
    private String sheet;

}
